1. Technical Field
The present invention relates generally to computer software and, more particularly, to tools for improved object oriented programming.
2. Description of Related Art
JAVA® is an object-oriented programming language designed to generate applications that can run on all hardware platforms, small, medium and large, without modification. Developed by Sun Microsystems, JAVA® has been promoted and geared heavily for the Web, both for public Web sites and intranets. JAVA® was modeled after C++, and JAVA® programs can be called from within HTML documents or launched stand alone. When a JAVA® program called from a Web page runs on a user's machine, it is called a “JAVA applet.” When it runs as a stand-alone, non Web-based program on a user's machine, it is simply a “JAVA application.”
JAVA® was originally developed in 1991 as a language for embedded applications such as those used in set-top boxes and other consumer-oriented devices. It became the fuel to ignite a revolution in thinking when Sun transitioned it to the Web in 1994. JAVA® is a full-blown programming language like C and C++ and allows for the creation of sophisticated applications. Thus far, JAVA® applications and applets have been mildly successful at the client side, but Java on the server has become very popular. Sun's J2EE enterprise model has become an application server standard.
JAVA® embodies the “write once-run anywhere” model, which has been one of the Holy Grails of computing for decades. For example, a J2EE server application can be replicated from a Unix server to a Windows server and vice versa with relative ease. Sometimes, a little tweaking is necessary; sometimes a lot, but JAVA® is closer to “write once-run anywhere” than any development platform in the past.
When designing a JAVA® application, one problem that has to be overcome is connecting the User Interface (UI or view) to the data it displays. One solution is The Model-View-Controller (MVC) pattern. The MVC pattern is a widely accepted design pattern for connecting an application's UI to the data it manipulates. In MVC, a Controller object 104 is interposed between the Model 108 (the business object) and the View 106 to mediate the flow of data and events.
A great benefit of MVC is that it ensures the Model 108 is not dependant upon the View 106. This facilitates a separation of concerns for development and testing and enhances reusability. However, this benefit does not come without a cost—it introduces a rather complex object, the Controller 104. A typical View 106 may have many components and would require a lot of code in the Controller 104 to connect (i.e., bind) those components to their data sources and event handlers. Writing this Controller 104 code is a very tedious, time-consuming and error-prone process, and the resultant code can be difficult to maintain. It contributes little to the business functionality of the application—it is simply a technical necessity needed to ‘wire’ the View 106 to its data and event handlers.
Therefore, it would be desirable to have a method, system, and computer program product to improve programmer productivity by simplifying the development of Java User Interfaces.